import axios from '@/utils/axios'

const addShopApi = '/sp_admin/business/shop/add' // 新增
const editShopApi = '/sp_admin/business/shop/update' // 编辑
const shopPageApi = '/sp_admin/business/shop/page' // 门店列表
const allShopListApi = '/sp_admin/business/shop/all' // 门店列表全部

/**
 * @desc 新增
 */
export const addShop = ({ data }) => {
  return axios.post(addShopApi, data)
}

/**
 * @desc 编辑
 */
export const editShop = ({ data }) => {
  return axios.post(editShopApi, data)
}

/**
 * @desc 门店列表
 */
export const shopPage = ({ data }) => {
  return axios.post(shopPageApi, data)
}

/**
 * @desc 门店列表全部
 */
export const allShopList = ({ params }) => {
  return axios({
    url: allShopListApi,
    method: 'post',
    params: params
  })
}
